home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / msdos.gcc < prev    next >
Text File  |  1993-07-08  |  19KB  |  499 lines

  1. This is README.1ST, which you should have read before any other.  Please
  2. read this COMPLETELY before going any further.
  3.  
  4. WARNING: This software comes with ABSOLUTELY NO WARRANTEE.  I can't even
  5. guarantee that this software won't wipe out your entire hard drive (it's
  6. happened to a few people before).  USE AT YOUR OWN RISK! It's always a
  7. good idea to make regular backups of your hard drives anyway. 
  8.  
  9. If you are using PKUNZIP to extract your files, don't forget the -d or
  10. you'll get them all in the same directory! All djgpp modules are
  11. designed to be unzipped from the same directory, so that they install
  12. themselves properly. 
  13.  
  14. djgpp is a complete 32-bit C and C++ development environment for DOS. 
  15. This product is intended for users who have experience using Unix, not
  16. DOS users who expect djgpp to act like any other DOS compiler.  This is
  17. NOT the software you want if you want to learn programming. 
  18.  
  19. Supported: 80386, 80387, 80486, XMS, himem.sys, VCPI, QEMM, 386MAX,
  20. DesqView. 
  21.  
  22. Unsupported: XTs, 80286, Windows (because Microsoft won't support DPMI
  23. 1.0), OS/2, multitasking, signals.
  24.  
  25. Features: 80387 emulator, 32-bit unix-ish environment, flat memory
  26. model, debugger, SVGA graphics.
  27.  
  28.     ====================  Reporting bugs  ====================
  29.  
  30. ALL changes to the source code should be submitted in "diff -c2" format. 
  31. If you just send replacement files, I'll reject them, since I don't know
  32. which parts you've changed and my sources keep changing anyway.  Diffs
  33. will also be rejected for use of bcc features in go32 sources (like //
  34. comments), or more than one feature or bugfix per diff.  Please use the
  35. same programming style as the existing style when making changes to my
  36. sources. 
  37.  
  38. Note that new features are not bugs.  If you would like to work on
  39. adding features to djgpp, please send me e-mail at dj@ctron.com
  40. beforehand, in case it's being worked on already and to coordinate it's
  41. integration.  If you want to request a new feature but not work on it,
  42. send to the mailing list. 
  43.  
  44. If the problem is in one of the FSF utilities, please don't expect me to
  45. fix it.  Problems with FSF code should be reported to the FSF; I only
  46. compile the code and distribute it.  My best suggestion is to post to
  47. the appropriate newsgroup or mailing list, but if you can't find one,
  48. try gnu@prep.ai.mit.edu. 
  49.  
  50. If the problem is in anything else, and you have e-mail access, I strongly
  51. recommend joining the djgpp mailing list.  To do so, send mail to
  52. listserv@sun.soe.clarkson.edu:
  53.  
  54.     $ mail listserv@sun.soe.clarkson.edu
  55.     Subject:
  56.     help
  57.     add djgpp
  58.     ^D
  59.  
  60. Any mail sent to djgpp@sun.soe.clarkson.edu will get automatically
  61. forwarded to all the subscribers on the list, and someone may have an
  62. answer to your query.  Note that I (DJ) am of course a subscriber, so I
  63. will get it also. 
  64.  
  65. If all else fails, you may contact me directly at dj@ctron.com
  66. (preferred) or at home:
  67.  
  68.     DJ Delorie
  69.     24 Kirsten Ave
  70.     Rochester, NH 03867-2954
  71.     USA
  72.  
  73.     ====================  Redistribution  ====================
  74.  
  75. The utilities built from FSF code may NOT be made available through any
  76. means not prepared to also distribute the source for those utilities. 
  77. This isn't just a good idea, it's the LAW.  Read the file "copying" for
  78. more details on FSF copyright terms.  Since djgpp includes such
  79. binaries, it requires the same terms. 
  80.  
  81. Programs that link in FSF code must comply with the GNU Library Licence,
  82. or the GNU public license.
  83.  
  84. I strongly recommend prepending stub.exe (use aout2exe) for any programs
  85. you intend to distribute.  This avoids me requiring a royalty, and aids
  86. upgrading go32, since stub.exe doesn't change. 
  87.  
  88.  
  89. This is the README file for DJ's GCC port to DOS ("djgpp")
  90.  
  91. Contents:
  92.     * Overview
  93.     * What's available
  94.     * How to install
  95.     * Deviations and Caveats
  96.     * Copyright information
  97.  
  98. Disclaimer: This software is distributed WITHOUT ANY WARRANTY; without
  99. even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  100. PURPOSE.
  101.  
  102. DJ Delorie
  103. USmail: 24 Kirsten Ave, Rochester, NH 03867-2954, USA
  104. email:  dj@ctron.com
  105.  
  106. mailing list: djgpp@sun.soe.clarkson.edu (listserv@sun.soe.clarkson.edu)
  107.  
  108.  
  109.  
  110.  
  111. Overview:
  112.  
  113. This package contains a 32-bit 80386 DOS extender with symbolic
  114. debugger, a C/C++ compiler with utilities, development libraries, and
  115. source code.  It generates full 32-bit programs and supports full
  116. virtual memory with paging to disk. 
  117.  
  118. Requirements:
  119.  
  120. A 80386-based IBM compatible PC or PS/2, approximately 4-5Mb of hard
  121. drive space, and 512K RAM.  Available extended (or expanded under VCPI)
  122. memory is strongly recommended.
  123.  
  124. Supported Wares:
  125.  
  126. * Up to 128M of extended memory (expanded under VCPI)
  127. * Up to 128M of disk space used for swapping
  128. * SuperVGA 256-color mode up to 1024x768
  129. * 80387
  130. * XMS & VDISK memory allocation strategies
  131. * VCPI programs, such as QEMM, DESQview, and 386MAX
  132.  
  133. Unsupported:
  134.  
  135. * DPMI
  136. * Microsoft Windows
  137. * Multiprocessing (fork())
  138.  
  139.  
  140.  
  141.  
  142. File location:
  143.  
  144.     host:      omnigate.clarkson.edu
  145.     login:     ftp
  146.     password:  send your e-mail address
  147.     directory: ~ftp/pub/msdos/djgpp
  148.  
  149. If there are too many ftp anonymous logins already, you'll get an
  150. access denied.  This just means you should try again later.
  151.  
  152. Many thanks to the sysops at Clarkson for providing a home to djgpp!
  153.  
  154. As a convenience to non-FTP users, djgpp is also stored on Clarkson's
  155. archive server.  To access the archive server, do this:
  156.  
  157.    % mail archive-server@omnigate.clarkson.edu
  158.    Subject: <none>
  159.    help
  160.    index msdos/djgpp
  161.    ^D
  162.  
  163. NOTE: In accordance with FSF CopyLeft, you are not allowed to upload
  164. this program to a distribution site unless that site also makes the FSF
  165. sources for these programs available.  Please read the file COPYING for
  166. more details.  FSF sources are available on prep.ai.mit.edu, and on
  167. omnigate.clarkson.edu
  168.  
  169. NOTE: If your application links in object modules that were written
  170. by FSF, your application counts as a "derived work" and must obey
  171. the provisions of the FSF Copyrights.  See the file COPYING for
  172. details.  Specifically, the C++ classes in libc.a and obstacks are
  173. FSF works that are covered by the GNU GPL.  The mere act of compiling
  174. does not affect the copyright status of your program.
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184. INSTALLING:
  185.  
  186. To install, you must do the following:
  187.  
  188. * Create a "temp" directory, like c:\tmp.
  189.  
  190. * Create a directory to install in, like c:\djgpp.
  191.  
  192. * Un-zip the appropriate zipfiles in the install directory.
  193.     C:\DJGPP> pkunzip -d -o djdev109.zip
  194.     C:\DJGPP> pkunzip -d -o djgas138.zip
  195.     C:\DJGPP> pkunzip -d -o djgcc222.zip
  196.  
  197. * Add the following lines to C:\CONFIG.SYS file (or edit existing
  198.   files= and shell= lines as appropriate).  The files= line prevents "too many
  199.   open files" errors when compiling, and the shell= line prevents "Out of
  200.   environment space" errors when setting lots of environment variables.
  201.  
  202.     files=15
  203.     shell=c:\command.com c:\ /e:600 /p
  204.  
  205. The values 15 and 600 are close to minimal.  You may want to increase them
  206. to provide a little more margin.
  207.  
  208.  
  209. * Add the following lines to C:\AUTOEXEC.BAT:
  210.     set COMPILER_PATH=c:/djgpp/bin
  211.     set C_INCLUDE_PATH=c:/djgpp/include
  212.     set CPLUS_INCLUDE_PATH=c:/djgpp/cplusinc;c:/djgpp/include
  213.           ^^^ only needed if you are compiling c++ programs
  214.     set OBJC_INCLUDE_PATH=c:/djgpp/include
  215.           ^^^ only needed if you are compiling objective-C programs
  216.     set OBJCPLUS_INCLUDE_PATH=c:/djgpp/include
  217.           ^^^ only needed if you are compiling objective-C++ programs
  218.     set LIBRARY_PATH=c:/djgpp/lib
  219.     set TMPDIR=c:/tmp
  220.              ^^^ this is where gcc's temp files go
  221.     set GO32TMP=c:/tmp
  222.                 ^^^ this is where your paging file goes - if not set, the
  223.                     variables TMP and TEMP are checked in that order
  224.     set GO32=ansi driver c:/djgpp/drivers/SOMETHING.grd gw 1024 gh 768
  225.                          ^^^ whatever driver works with your VGA (optional)
  226.     set BISON_SIMPLE=c:/djgpp/lib/bison.simple
  227.           ^^^ only needed if you use bison
  228.     set BISON_HAIRY=c:/djgpp/lib/bison.hairy
  229.           ^^^ only needed if you use bison
  230.     set FLEX_SKELETON=c:/djgpp/lib/flex.skeleton
  231.           ^^^ only needed if you use flex
  232.  
  233.   Remember that unless you manually type these at the command line,
  234.   they won't take effect until you reboot.  Don't include the "ansi"
  235.   keyword in the "go32" variable if you don't have an ANSI.SYS driver
  236.   or equivalent.
  237.  
  238. * Add your binaries directory to your PATH in C:\AUTOEXEC.BAT
  239.     SET PATH= . . . ;C:\DJGPP\BIN
  240.  
  241. That's it! djgpp is now installed on your system.
  242.  
  243.  
  244.  
  245.  
  246.  
  247. The GO32 environment variable:
  248.  
  249.  
  250. This variable controls the options available in go32 or debug32.  The
  251. syntax of this variable is:
  252.  
  253.   SET GO32=[parm [value]] [parm [value]] . . .
  254.  
  255. Parameters:
  256.  
  257.   ansi           Use ANSI commands to control the color in debug32
  258.   mono           Use the Monochrome monitor for debugging - useful when
  259.                    debugging graphics applications
  260.   1rm            Redirect stdout (file #1) to the monochrome monitor
  261.   2rm            Redirect stderr (file #2) to the monochrome monitor
  262.   1r2            Redirect stdout (file #1) to stderr (file #2)
  263.   2r1            Redirect stderr (file #2) to stdout (file #1)
  264.  
  265.   glob           enable globbing (default)
  266.   noglob         disable globbing
  267.  
  268.   emu [path]     Use the specified file as the 80387 emulator
  269.  
  270.   driver [path]  Use the specified file as the graphics driver
  271.   gw [width]     Default graphics width
  272.   gh [height]    Default graphics height
  273.   tw [width]     Default text width
  274.   th [height]    Default text height
  275.   nc [colors]    Number of colors (for new-style drivers only - see cbgrx*.zip)
  276.  
  277.  
  278. These parameters may occur in any order.
  279.  
  280. Note that "1rm" and "2rm" are done before "1r2" and "2r1", so "1rm 2r1" sends
  281. stdout to the mono monitor and stderr to any redirection used.
  282.  
  283. Examples:
  284.  
  285.   C:\> set GO32=mono driver c:\djgpp\drivers\tseng4k.grd gw 1024 gh 768 tw 132 th 43 nc 256
  286.   C:\> set GO32=ansi
  287.   C:\> set GO32=driver c:\djgpp\drivers\tseng4k.grd ansi
  288.   C:\> set GO32=mono 1rm 2rm
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299. Deviations and Caveats:
  300.  
  301. GCC/G++ deviates from the U**x version in a number of ways, mostly to
  302. accomodate deficiencies in the MS-DOS environment, and my own laziness.
  303.  
  304. * An 80387 is required to do floating point.  An emulator is provided.
  305.   cc1 and cc1plus shouldn't use the 387 unless compiling floating point
  306.   code.  The environment variable "387" can override the auto-detection
  307.   routine:
  308.     SET 387=YES   to force 387 handlers to be enabled
  309.     SET 387=NO    to force 387 accesses to fault
  310.     SET 387=QUERY to get a message showing the results of the auto-detection
  311.   If no 80387 is present and the program attempts to use it, a message
  312.   indicating where the instruction is will be displayed.  To use the
  313.   387 emulator, add "emu c:\djgpp\emu387\emu387" to the GO32 environment
  314.   variable.  Specifying use of the emulator overrides the "387"
  315.   environment variable and autodetection code.
  316.  
  317. * The VDISK method of allocating extended memory is supported.  The
  318.   INT 15h method is also.  When the extender runs out of conventional and
  319.   extended memory, it uses a paging file named $(GO32TMP)/pgXXXXXX.386, where
  320.   XXXX is an unspecified hex value.  This file is normally removed on exit.
  321.  
  322. * Up to 128 MB of physical memory and 128 MB of disk swap space are allowed.
  323.   A 512K machine is sufficient, but very slow due to paging.
  324.  
  325. * The utilies support the MS-DOS standard response file method for giving
  326.   more than 128 bytes of command line.  Example: "gcc -o foo @foo.lnk" where
  327.   foo.lnk contains a list of .o files.  Wildcard expansion (globbing) is
  328.   performed on the parameters, unless they are surrounded by single quotes.
  329.   Double quotes can be used to prevent spaces from separating arguments.
  330.   Also supported is the GNUish-DOS method of passing arguments in
  331.   environment variables.
  332.  
  333. * Since MS-DOS does not distinguish case in file names, some .h files
  334.   used for C++ have had underscores prepended to them to avoid conflict
  335.   (ie: String.h conflicts with string.h, so it became _String.h).
  336.  
  337. * When using ar to create archives, be warned that the ar version
  338.   supplied cannot update an archive that's been sequenced (ar s foo.a),
  339.   and cannot sequence a file that's been sequenced.  Also, ld cannot
  340.   use an archive that's not sequenced.  The following method is suggested:
  341.       ar rv mylib.a $(OBJS)
  342.       cp mylib.a mylib2.a
  343.       ar rvs mylib2.a
  344.       (and then link with mylib2.a)
  345.  
  346. * The extender can be added to any gcc-compiled program by copying go32.exe
  347.   to be <program>.exe, where <program> is the 32-bit program.  For example,
  348.   if "hello" is a gcc-compiled a.out file, and "hello.exe" is a copy of
  349.   go32.exe, then when "hello.exe" runs, it loads the file called "hello"
  350.   in the same directory, and executes it if present.  Otherwise,
  351.   the first parameter is the executable (ie: go32 cc1plus foo.cc).
  352.  
  353. * The extender can be merged to create one .exe file that is the extender
  354.   and the executable in one file, by using the stub.exe program:
  355.       copy /b stub.exe+myprog myprog.exe
  356.        -or-
  357.       aout2exe myprog
  358.   This will only work if go32.exe is in your search path, because stub.exe
  359.   runs it.  Alternatively, you can prepend go32.exe itself to an a.out file
  360.   to get a single executable (stub.exe is much smaller).  Note that if
  361.   you re-compile go32 or stub, you must strip off the symbol table first. 
  362.  
  363. * The extender runs programs at logical address 0.  A copy of the first
  364.   1 MB of physical memory (including the AT channel) is mapped to
  365.   0xE0000000 in the program's address space.  The stack grows down from
  366.   0x7FFFFFFC in the program's address space.  Data usually starts at
  367.   0x00400000.
  368.  
  369. * The paging mechanism understands how SuperVGA's map their memory onto
  370.   the AT bus and automatically swaps pages as the program tries to
  371.   access them.  The program sees a linear range from 0xD0000000 to
  372.   0xD0100000 that corresponds to each pixel in the 256-color modes
  373.   of SuperVGAs.  To use this feature, you'll have to set the GO32
  374.   environment variable like this:
  375.     C>set go32=driver c:\djgpp\drivers\tseng4k.grd gw 640 gh 480 tw 132 th 43
  376.   These parameter pairs can be omitted or rearranged as needed.  They are
  377.   the "driver" name, default graphics width and height, and default
  378.   text width and height. Libgr.a doesn't have to be recompiled, nor
  379.   do graphics programs, when a different graphics mode is selected
  380.   (the extender handles it).  It is strongly recommended that the program
  381.   use the GR_default_graphics and GR_default_text modes to switch to
  382.   graphics or text.  These modes use the parameters specified by the
  383.   GO32 environment variable, allowing the user to select a favorite
  384.   graphics and text mode.
  385.  
  386. * Symbols are stored in virtual memory, so you won't run out of symbol
  387.   space until both extended memory and the disk are all used up.  For
  388.   large programs, you might notice a slight delay while it looks up
  389.   symbols.  Programs with a lot of lines in a given module may run out
  390.   of memory as the line number table is built in real memory and transferred
  391.   to virtual memory.
  392.  
  393. * Signals are not reported to the program.  However, interrupts do continue
  394.   to get serviced while in protected mode (ie: keypress, timer, etc).
  395.   CTRL-C will get you back to the debugger in debug32, and you can continue
  396.   from where you stopped.  All signals (ie: exceptions) cause debugging
  397.   traps in debug32, or general faults in go32.
  398.  
  399.  
  400.  
  401. Copyright Information:
  402.  
  403. * Source code for the GNU utilities is copyright (c) Free Software Foundation.
  404.   For more information on the FSF copyright, see their source code or write
  405.   Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  406.  
  407.   A copy of their file "COPYING" is included in the docs directory.  Some of
  408.   the FSF source code has been modified to operate properly in the MS-DOS
  409.   environment.
  410.  
  411. * Source code for most of libc.a are copyright (c) Regents of the University
  412.   of California.  These files include copyright information in them.  The
  413.   utilities are compiled against these libraries, and thus contain software
  414.   developed by the University of California, Berkeley, and its contributors.
  415.   Some of the BSD source code has been modified to operate properly in the
  416.   MS-DOS environment.
  417.  
  418. * Any sources not falling under the copyrights of FSF or UCB (as above) are
  419.   Copyright (c) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954.
  420.   To contact me via E-Mail, sent to "dj@ctron.com".  Cabletron Systems Inc
  421.   is in no way involved with this project; I just happen to work for them
  422.   during the day.
  423.  
  424. Terms and Conditions:
  425.  
  426. * Source code copyright FSF is distributed under the terms of the GNU
  427.   Public General License.  See the file "COPYING" in doc.arc for more
  428.   information.  If your program links in object modules (in libc.a) that
  429.   are compiled from GNU sources, then your entire program must be
  430.   distributed under the terms of the GNU GPL as a "derived work".  These
  431.   modules are the C++ class library (including the streams classes) and
  432.   obstacks.  The sources in libsrc have the copyright notices in them
  433.   for the various modules.
  434.  
  435. * Source code copyright UCB is distributed under the terms listed in the
  436.   UCB source code itself.
  437.  
  438. * Source code copyright DJ Delorie is distributed under the terms of the
  439.   GNU General Public Licence, with the following exceptions:
  440.   ("go32.exe" refers to go32.exe and debug32.exe)
  441.  
  442.   * There are no conditions on distributing copies of stub.exe or emu387
  443.     as they are originally distributed in this software package.
  444.  
  445.   * If a user creates an application, prepends a copy of go32.exe onto
  446.     the beginning of it, and distributes it free of charge, then the
  447.     user is under no obligations to distribute source or pay royalties.
  448.     Note that the copyright terms of the FSF and/or UCB must be
  449.     obeyed regardless of this.
  450.   
  451.   * If a user creates an application, prepends a copy of go32.exe onto
  452.     the beginning of it, and charges a fee for the software, then a
  453.     royalty of $5 or 5% of the selling price per copy sold must be paid
  454.     to DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954.  Note that
  455.     shareware programs are not considered "sold" until payment is rendered
  456.     for them.
  457.  
  458.   * For all other cases, source code for go32.exe must be distributed
  459.     with any distributed copies of go32.exe, or made available as per
  460.     the terms of the GNU GPL.  In these cases, no royalties are due,
  461.     and all freedoms provided by the GPL apply.
  462.   
  463.   * Software that requires go32.exe to run, but is not distributed with
  464.     a copy of go32.exe, incurs no obligations with regards to the
  465.     above sections.
  466.  
  467.   * Contact me for special terms if none of the above are suitable.
  468.  
  469.   * Donations are always appreciated.
  470.  
  471.   The intent of this copyright is this: If you make money by using the
  472.   programs I wrote, I get some of it.  If you use your sources to
  473.   teach others how to write programs, I'll support you.
  474.  
  475.   Changes to source code copyright BSD or FSF are copyright DJ Delorie, but
  476.   fall under the terms of the original copyright.
  477.  
  478.  
  479.  
  480.  
  481.  
  482. Donations may be made to any of the following:
  483.  
  484.     DJ Delorie
  485.     24 Kirsten Ave
  486.     Rochester, NH  03867-2954
  487.     USA
  488.  
  489.     Free Software Foundation
  490.     675 Mass Ave
  491.     Cambridge, MA  02139
  492.     USA
  493.  
  494.     Computer Systems Research Group
  495.     Computer Science Division, EECS
  496.     University of California
  497.     Berkeley, California  94720
  498.     USA
  499.